﻿CREATE TABLE [dbo].[ExecutieCheltuieliPacienti] (
    [IDExecCheltPacienti] INT          IDENTITY (1, 1) NOT NULL,
    [IDDepartament]       INT          NOT NULL,
    [IDCasaAsigSanatate]  SMALLINT     NOT NULL,
    [Data]                DATETIME     NOT NULL,
    [Internati]           DECIMAL (18) DEFAULT ((0)) NOT NULL,
    [ZileSpitalizare]     DECIMAL (18) DEFAULT ((0)) NOT NULL,
    [IDJurnal]            INT          NULL,
    [CodUnitate]          SMALLINT     NOT NULL,
    CONSTRAINT [PK_ExecutieCheltuieliPacienti] PRIMARY KEY CLUSTERED ([IDExecCheltPacienti] ASC),
    CONSTRAINT [FK_ExecutieCheltuieliPacienti_CaseAsigurariSanatate] FOREIGN KEY ([IDCasaAsigSanatate]) REFERENCES [dbo].[CaseAsigurariSanatate] ([IdCasaAsigSanatate]),
    CONSTRAINT [FK_ExecutieCheltuieliPacienti_Departamente] FOREIGN KEY ([IDDepartament]) REFERENCES [dbo].[Departamente] ([IDDepartament]),
    CONSTRAINT [FK_ExecutieCheltuieliPacienti_Unitati] FOREIGN KEY ([CodUnitate]) REFERENCES [dbo].[Unitati] ([CodUnitate])
);

